﻿// $Id: EndActivityState.cs 10 2008-02-29 15:58:02Z mcartoixa $
/*
 *  Copyright (C) 2007 NourY Solutions
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 3 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 */
/*! \file
 * \brief Definition of \c Salamanca.DataActivities.EndActivityState.
 *
 * \author $Author: mcartoixa $
 * \date $Date: 2008-02-29 16:58:02 +0100 (ven., 29 févr. 2008) $
 * \version $Revision: 10 $
 */

using System;
using System.Collections.Generic;
using System.Text;

namespace Salamanca.DataActivities
{



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary>Activity state that ends the activity.</summary>
    ///
    ///////////////////////////////////////////////////////////////////////////

    public sealed class EndActivityState<TActivityData>:
        ActivityState<TActivityData>
        where TActivityData:
            IActivityData
    {

        /// <summary>Initializes a new <see cref="EndActivityState{TActivityData}" />.</summary>
        public EndActivityState(TActivityData data):
            base(data)
        {
        }

        /// <summary>Gets the next state in the state machine.</summary>
        protected override IActivityState NextState
        {
            get
            {
                return null;
            }
        }

        /// <summary>Processes the state.</summary>
        /// <param name="controller">The controller for the activity.</param>
        protected override ActivityStateResult Handle(IActivityController controller)
        {
            return ActivityStateResult.End;
        }

    }
}
